package com.itheima.stock.controller;

import com.itheima.stock.common.domian.StockBlockDomain;
import com.itheima.stock.service.StockBlockService;
import com.itheima.stock.vo.result.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author: siwukun
 * @date: 2022/06/01
 * @description: 板块指数
 */
@RestController
@RequestMapping("/api/quot/sector")
public class StockBlockController {

    @Autowired
    private StockBlockService stockBlockService;


    @GetMapping("/all")
//    @PreAuthorize("hasAuthority('标记用户角色测试')")
    public R<List<StockBlockDomain>> getStockBlock(){
        return stockBlockService.queryAllStockBlock();
    }

}
